<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<section id="folder-detail-section">
	<div class="row-fluid">
		<div class="span6">
			<div class="page-header">
				<h3>Folder Detail</h3>
			</div>
		</div>
		<div class="span18">
			<table class="table table-striped table-bordered table-condensed">
				<tbody>
					<tr>
						<td>Name</td>
						<td>${folder.name}</td>
					</tr>
					<tr>
						<td>User</td>
						<td><a href="user/${folder.user.id}">${folder.user.email}</a></td>
					</tr>
				</tbody>
			</table>

			<table class="table table-striped table-bordered table-condensed">
				<thead>
					<tr>
						<th>Provider</th>
						<th>Path</th>
						<th>Create Time</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${folder.syncs}" var="sync">
						<tr>
							<td><a href="provider/${sync.provider.id}">${sync.provider.name}</a></td>
							<td>${sync.path}</td>
							<td>${sync.createTime}</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>

			<table class="table table-striped table-bordered table-condensed">
				<thead>
					<tr>
						<th>Path</th>
						<th>Length</th>
						<th>Last Modified</th>
						<th>Create Tick</th>
						<th>Create Provider</th>
						<th>Update Tick</th>
						<th>Update Provider</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${folder.items}" var="item">
						<tr>
							<td><a href="item/${item.id}">${item.path}</a></td>
							<td>${item.length}</td>
							<td>${item.lastModified}</td>
							<td>${item.createTick}</td>
							<td>${item.createProvider.name}</td>
							<td>${item.updateTick}</td>
							<td>${item.updateProvider.name}</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
		</div>
	</div>
</section>